﻿Public Class WebForm2
    Inherits System.Web.UI.Page

    Private _typeoff
    Public Property TypeOff As String
        Get
            Return _TypeOFf
        End Get
        Set(value As String)
            _typeoff = value
        End Set
    End Property

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        AutomaticUploadToBackYardServer.InitTimer()
    End Sub

    Protected Sub Unnamed_Click(sender As Object, e As EventArgs)
        If Datum.Text <> "" Then
            TypeOff = "Ges. Anzahl Mandate: "
        ElseIf Rayon.Text <> "" Then
            TypeOff = "Ges. Anzahl der Tage: "
        End If

        Dim ff

        If UseInSearchCB.Checked = True Then
            ff = search(Me.Datum.Text, Me.Rayon.Text, Me.DropDownList1.SelectedValue)
        Else
            ff = search(Me.Datum.Text, Me.Rayon.Text, "")
        End If


        Dim gg = SumUpSearch(ff)
        Me.StVo.Text = gg.StVoAnzahl
        Me.Pg.Text = gg.PgAnzahl
        Me.Ges.Text = gg.GesamtAnzahl

      
        DataList1.Enabled = True
        DataList1.DataSource = TransfromToMandateNormalType(ff)
        DataList1.DataBind()
        
    End Sub

    Private Sub Datum_TextChanged(sender As Object, e As EventArgs) Handles Datum.TextChanged
        If Datum.Text <> "" Then
            TypeOff = "Ges. Anzahl Mandate: "
        End If
    End Sub

    Private Sub Rayon_TextChanged(sender As Object, e As EventArgs) Handles Rayon.TextChanged
        If Rayon.Text <> "" Then
            TypeOff = "Ges. Anzahl der Tage: "
        End If
    End Sub

    Private Sub DataListSelectionChangedEvent(sender As Object, e As EventArgs)
    End Sub

    Protected Sub RemoveButton_Click(sender As Object, e As EventArgs)
        Response.Write(sender.GetType.Name.ToString)
    End Sub

    Protected Sub Delete_Command(sender As Object, e As CommandEventArgs)

    End Sub

  
End Class